#include"processBar.h"
#include<unistd.h>
int Bartest(int speed)
{
    int cnt = 0;
    char bar[32];
    memset(bar, '\0', sizeof(bar));
    while(cnt <= 30)
    {
        printf("[%-30s][%d%%]\r",bar, (cnt*100/30));
        fflush(stdout);
        bar[cnt++] = '#';
        usleep(speed);
    }
    printf("\n");
    return 0;
}
